define(function(require,exports,module){
	var ELView = require("elview");
	var template = require("./assets/tpl/prodArchive_main.tpl");
	
	var cNav = require("./view/prodArchiveNav");
	var cGrid = require("./view/prodArchiveGrid");
	var cForm = require("./view/prodArchiveForm");
	
	var model = require("./model/prodArchiveModel");
	var service = require("./svc/prodArchiveSvc");
	
	var App = ELView.extend({
		attrs: {
			template: template
		},
		model: model,
		service: service,
		initComponent: function(params,widget){
			cNav.initComponent(widget);
			cGrid.initComponent(widget);
			cForm.initComponent(widget);
		},
		toList: function(){
			this.hide([".J-form"]).show([".J-grid"]);
			this.get("subnav").hide(["return"]).show(["add","search"]);
		},
		toCard: function(){
			this.show([".J-form"]).hide([".J-grid"]);
			this.get("subnav").show(["return"]).hide(["add","search"]);
		}
	});
	
	module.exports = App;
});